import { VuexModule, Module, Action, Mutation, getModule } from 'vuex-module-decorators'
import store from '@/store'

export interface BasicState {
  scale: number
}

@Module({ dynamic: true, store, name: 'basic' })
class Basic extends VuexModule implements BasicState {
  public scale = 1

  @Mutation
  private setScale(scale: number) {
    this.scale = scale
  }

  @Action
  private SETSCALE(scale: number) {
    this.setScale(scale)
  }
}

export const basicModule = getModule(Basic)
